<div class="changePass">
    <form id="changePass" name="changePass" action="" method="GET" onsubmit="return postdata(this)">
        <table border="0">
            <tr>
                <td style="text-align: center;" colspan="2" class ="txtpasstitle">
                    Change Password
                </td>               
            </tr>
            <tr>
                <td class ="txtPass">
                    Old Password:
                </td>
                <td>
                    <input type="password" name="oldpass" onBlur="checkOldPass(this.value)" size="30"/>
                </td>
                <TD id="msg" style="color: red;">*</TD>
            </tr>
            <tr>
                <td class ="txtPass">
                    New Password:
                </td>
                <td>
                    <input type="password" name="pass" id="pass" size="30" onkeyup="passwordStrength(this.value,document.getElementById('inf_pass'),document.getElementById('inf_pass'))" />
                </td>
                <TD id="inf_pass" style="color: red;">*</TD>
            </tr>
            <tr>
                <td class ="txtPass">
                    New Password Confirm:
                </td>
                <td>
                    <input type="password" name="conf" id="conf" onkeyup="checkPass(); return false;"  size="30"/>
                </td>
                <TD id="inf_conf" style="color: red;">*</TD>
            </tr>
            <tr>
                <td style="text-align: center;" colspan="2">
                    <input type="submit" value="Change Pass" name="changePass" class="button"/>
                </td>               
            </tr>
        </table>
    </form>
</div>
<div id="lblMessage"></div>
<script type="text/javascript">
function postdata(formData){
	var oldpass = formData.oldpass.value;
	var pass = formData.pass.value;
	var conf = formData.conf.value;
	var request = $.ajax({
	  url: "controller/login/changePass.php",
	  beforeSend: function() {
		    alert("Data Are Saving.");
		  },
	  success: function() {
		    alert("Data Complete Saved");  
		    window.location.replace('index.php');
		  },
	  type: "GET",
	  data: {pass : pass , oldpass : oldpass , conf : conf},
	  dataType: "html"
	});
	return false;
}  
</script>